package com.example.listener;

import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionListener;

/**
 * @author XieYa
 */
public class MyJobListener implements JobExecutionListener {

    @Override
    public void beforeJob(JobExecution jobExecution) {
        System.err.println(jobExecution.getJobInstance().getJobName() + "Job before...");
    }

    @Override
    public void afterJob(JobExecution jobExecution) {
        System.err.println(jobExecution.getJobInstance().getJobName() + "Job after...");
    }
}
